home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb4.arc
/
GETKEYS.LIB
< prev
next >
Wrap
Text File
|
1984-12-02
|
755b
|
23 lines
{@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
The purchaser of these procedures and functions may include them in COMPILED
programs freely, but may not sell or give away the source text.
The procedure GetKeys waits for a key to be pressed. If the key
was an ordinary one, its value is returned in "choice" and chr(0)
in "EscChoice". If the key was a "special" key, chr(27) (= ESC) is
returned in "choice" and a code in EscChoice.
The file KEYCHART.DAT gives the codes for the "special" keys.
}
procedure GetKeys(var choice, EscChoice:char);
begin
EscChoice := chr(0);
repeat until Keypressed;
read(Kbd,Choice);
if keypressed then read(Kbd,EscChoice);
end;